﻿    @*<link href="../Content/Styles/page_styles.css" rel="stylesheet" type="text/css" /> *@
    @*<link href="../Content/Styles/styles.css" rel="stylesheet" type="text/css" />*@

    <script src="@Url.Content("/Scripts/jquery-1.6.2.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {

            //            $('input[name="Login"]').click(function () {
            //                $("#signin-message").html('');
            //                $("#popupSignInForm").submit();
            //            });

            $('input[name="Cancel"]').click(function () {
                $('#appDiv4').dialog('close');
            });

            $('area[id="closesignin"]').live("click", function (e) {
                $('#appDiv4').dialog('close');
                //$('#appDiv4').hide();
            });
        });

        function SubmitSForm() {
            //$('input[name="Login"]').unbind('click');
            //$('#popupSignInForm').unbind('submit');
            $("#signin-message").html('');
            $("#popupSignInForm").submit();
            return false;
        }
 
    </script>
    
@model RipPoll.Web.Mvc.Models.SignInModel

@using (Ajax.BeginForm("newpopupsignin", "User", null,
        new AjaxOptions
        {
            UpdateTargetId = "signin-message",
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "POST",
            OnSuccess = "SignInSuccess"
        }, new { @id = "popupSignInForm" }))
{
        
            <div style="visibility:visible;position: absolute;background: #FFF;	border: 10px solid #999; height:340px;">
                <table width="485px">
                    <tr>
                        <td>
                        <div id="registerHeader">
                            <img src="../content/images/login_here.png" width="485" height="50" border="0" usemap="#Map2" />
                            <map name="Map2" id="Map2">
                            <area id="closesignin" shape="rect" coords="445,10,478,40" href="#" />
                            </map>
                        </div>
                        <div id="signin-message"></div>
                        <div>
                            @TempData[RipPoll.Common.WebConstants.SignInMessage]
                            @Html.ValidationSummary(true, "Sign in is not successful...")
                        </div>
                        <div id="loginRightCol">
                            <table width="79%" border="0" align="center" cellpadding="5" cellspacing="0">
                            <tr>
                                <td width="63" align="right" class="formTopics">username or email</td>
                                <td width="291" colspan="3" align="center">
                                    @Html.TextBoxFor(m => m.usernameoremail, new { @class = "TextBox300" })
                                    @Html.ValidationMessageFor(m => m.usernameoremail)
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="formTopics">password</td>
                                <td colspan="3" align="center">
                                    @Html.PasswordFor(m => m.password, new { @class = "TextBox300" })
                                    @Html.ValidationMessageFor(m => m.password)
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center">
                                    <input name="checkbox2" type="checkbox" id="checkbox2" checked="checked" />
                                Remember me</td>
                            </tr>
                            <tr>
                                <td align="left" colspan="4">
                                    <input type="button" name="Login" id="Register" value="Login" onclick="javascript:SubmitSForm();"/>     
                                </td>
                            </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    }


